package com.NeuglsWorkStudio.UI.FormElement.Component
{
	import com.NeuglsWorkStudio.UI.FormElement.Config.TConfig;
	import com.NeuglsWorkStudio.UI.FormElement.Config.TCustomEditConfig;

	public class TCustomEdit extends TComponent
	{
		
		private var _FText:String="";
		private var _FBaseColor:int=0x222222;
		
		public function TCustomEdit(AConfig:TConfig)
		{
			super(AConfig);
		}
		
		
		public function get BaseColor():int
		{
			return _FBaseColor;
		}

		public function set BaseColor(value:int):void
		{
			_FBaseColor = value;
		}

		public function get Text():String
		{
			_FText=GetText();
			return _FText;
		}

		public function set Text(value:String):void
		{
			_FText = value;
			SetText(value);	
		}
		
		private function GetConfig():TCustomEditConfig{
			return _FConfig as TCustomEditConfig;
		}

		override protected function Init():void{
			super.Init();
			_FText=GetConfig().Text;
			_FBaseColor=GetConfig().BaseColor;
		}
		
		protected function SetText(val:String):void{
			
		}
		
		protected function GetText():String{
			return "";
		}
	}
}